<?php
/**
 * Created by PhpStorm.
 * Date: 2018/4/23
 * Time: 下午10:32
 * qq: 1067713962
 */

namespace app\home\controller;
use think\Db;

class Extension extends Com
{
    public function index()
    {
        if(!session('user_id')){
            $this->redirect('Login/index');
        }
        $status=Db::name('mumber')->where('uid',session('user_id'))->find();
  /*   if($status['status']!='1'){
              echo '<script>alert("购买产品后再进行推广");window.history.go(-1);</script>';
              die;
        }*/
        $url = Db::name('url')->where('status = 1')->value('url');
        $qrdata = 'http://qr.liantu.com/api.php?text=http://'.$url.'/home/login/register?fid='.session('user_id');
        $a_url="http://".$url.'/home/login/register?fid='.session('user_id');
        $this->assign('a_url',$a_url);
        $this->assign('url',$qrdata);
        return view();
    }

}